﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon;
using BCDto.Utils;

namespace BCDto.Common.Business.WebsiteBusinessCategory
{
    /// <summary>
    /// 官网业务分类
    /// </summary>
    public class WebsiteBusinessCategoryRequestDto
    {
        /// <summary>
        /// 官网业务标记码
        /// </summary>		
        [Display(Name ="官网业务标记码")]
        [Required(ErrorMessage="{0} 不应为空!")]
        [MaxLength(50,ErrorMessage ="{0} 最多可输入50个字符!")]
        [RegularExpression(RegexPatterns.ENGLISH_AND_UNDERLINE, ErrorMessage = "{0} 仅支持英文字母及下划线组合!")]
        public string WebsiteBusinessTagcode { get; set; }
        /// <summary>
        /// 标题
        /// </summary>		
        [Display(Name = "标题")]
        [Required(ErrorMessage = "{0} 不应为空!")]
        [MaxLength(20, ErrorMessage = "{0} 最多可输入20个字符!")]
        public string Title { get; set; }
        /// <summary>
        /// 图标
        /// </summary>		
        [Display(Name = "图标")]
        [Required(ErrorMessage = "{0} 不应为空!")]
        [MaxLength(1000, ErrorMessage = "{0} 最多可输入20个字符!")]
        [Image(new string[] { "png" },ErrorMessage="{0} 仅支持PNG格式图片!")]
        public string Icon { get; set; }
        /// <summary>
        /// 背景
        /// </summary>		
        [Display(Name = "背景")]
        [Image(ErrorMessage ="{0} 仅支持JPG,JPEG,PNG格式图片!")]
        public string Background { get; set; }
        /// <summary>
        /// 跳转地址
        /// </summary>		
        public string LinkUrl { get; set; }
    }
}

